using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Make XY Event Layer</para>
    /// <para>Creates a new point feature layer based on x- and y-coordinates defined in a table. If the source table contains z-coordinates (elevation values), that field can also be specified in the creation of the event layer. The layer created by this tool is temporary.</para>
    /// <para>基于表中定义的 x 坐标和 y 坐标创建新的点要素图层。如果源表包含 z 坐标（高程值），则还可以在创建事件图层时指定该字段。此工具创建的图层是临时的。</para>
    /// </summary>    
    [DisplayName("Make XY Event Layer")]
    public class MakeXYEventLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeXYEventLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_table">
        /// <para>XY Table</para>
        /// <para>The table containing the x- and y-coordinates that define the locations of the point features to create.</para>
        /// <para>包含定义要创建的点要素位置的 x 坐标和 y 坐标的表。</para>
        /// </param>
        /// <param name="_in_x_field">
        /// <para>X Field</para>
        /// <para>The field in the input table that contains the x-coordinates (or longitude).</para>
        /// <para>输入表中包含 x 坐标（或经度）的字段。</para>
        /// </param>
        /// <param name="_in_y_field">
        /// <para>Y Field</para>
        /// <para>The field in the input table that contains the y-coordinates (or latitude).</para>
        /// <para>输入表中包含 y 坐标（或纬度）的字段。</para>
        /// </param>
        /// <param name="_out_layer">
        /// <para>Layer Name</para>
        /// <para>The name of the output point event layer.</para>
        /// <para>输出点事件图层的名称。</para>
        /// </param>
        public MakeXYEventLayer(object _table, object _in_x_field, object _in_y_field, object _out_layer)
        {
            this._table = _table;
            this._in_x_field = _in_x_field;
            this._in_y_field = _in_y_field;
            this._out_layer = _out_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Make XY Event Layer";

        public override string CallName => "management.MakeXYEventLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_table, _in_x_field, _in_y_field, _out_layer, _spatial_reference, _in_z_field];

        /// <summary>
        /// <para>XY Table</para>
        /// <para>The table containing the x- and y-coordinates that define the locations of the point features to create.</para>
        /// <para>包含定义要创建的点要素位置的 x 坐标和 y 坐标的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _table { get; set; }


        /// <summary>
        /// <para>X Field</para>
        /// <para>The field in the input table that contains the x-coordinates (or longitude).</para>
        /// <para>输入表中包含 x 坐标（或经度）的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("X Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_x_field { get; set; }


        /// <summary>
        /// <para>Y Field</para>
        /// <para>The field in the input table that contains the y-coordinates (or latitude).</para>
        /// <para>输入表中包含 y 坐标（或纬度）的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_y_field { get; set; }


        /// <summary>
        /// <para>Layer Name</para>
        /// <para>The name of the output point event layer.</para>
        /// <para>输出点事件图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_layer { get; set; }


        /// <summary>
        /// <para>Spatial Reference</para>
        /// <para>The spatial reference of the coordinates specified in the X Field and Y Field parameters. This will be the output event layer's spatial reference.</para>
        /// <para>X 字段和 Y 字段参数中指定的坐标的空间参考。这将是输出事件图层的空间参考。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Z Field</para>
        /// <para>The field in the input table that contains the z-coordinates.</para>
        /// <para>输入表中包含 z 坐标的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_z_field { get; set; } = null;


        public MakeXYEventLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}